<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:rich="http://richfaces.ajax4jsf.org/rich"
                template="layout.xhtml">

   <ui:define name="left">
   </ui:define>

   <ui:define name="body">
      <f:subview id="searchresults" rendered="#{searchResults.rowCount == 0}">
          <h2>
              <h:outputText value="#{messages.noSearchResultsHeader}" />
          </h2>
      </f:subview>

      <h:form rendered="#{searchResults.rowCount > 0}">
          <div class="controlBar">
              <div class="buttonbox">
                  <div class="button">
                      <h:commandLink action="#{search.nextPage}" rendered="#{!search.lastPage}">
                          <img src="img/arrow-r.png" />
                      </h:commandLink>
                      &#160;
                  </div>
                  <div class="button">
                      <h:commandLink action="#{search.prevPage}" rendered="#{!search.firstPage}">
                          <img src="img/arrow-l.png" />
                      </h:commandLink>
                      &#160;
                  </div>
              </div>

              <div class="message">#{messages.searchResultsHeader}</div>
          </div>

          <h:dataTable value="#{searchResults}"
                       var="content"
                       styleClass="contenttable"
                       headerClass="contenttablehead"
                       rowClasses="results"
                       columnClasses="contenttablecol">
              <h:column>
                  <f:facet name="header">
                      <h:outputText value="#{messages.searchResultsTitle}" />
                  </f:facet>
                  <h:commandLink value="#{content.title}" action="#{contentManager.selectContent(content)}"/>
              </h:column>

              <h:column>
                  <f:facet name="header">
                      <h:outputText value="Author" />
                  </f:facet>
                  <h:outputText value="#{content.author.name}" />
              </h:column>
          </h:dataTable>
      </h:form>
   </ui:define>

   <ui:define name="right">
   </ui:define>

   <ui:define name="foot">
   </ui:define>

</ui:composition>